package com.sjb.mianshiya.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sjb.mianshiya.model.domain.QuestionBankQuestion;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sjb.mianshiya.model.domain.User;
import com.sjb.mianshiya.model.request.BatchAddRequest;
import com.sjb.mianshiya.model.request.questionBankQuestion.QuestionBankQuestionQueryRequest;
import com.sjb.mianshiya.model.vo.QuestionBankQuestionVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author dell
* @description 针对表【question_bank_question(题库题目)】的数据库操作Service
* @createDate 2024-09-17 15:40:16
*/
public interface QuestionBankQuestionService extends IService<QuestionBankQuestion> {

    void validQuestionBankQuestion(QuestionBankQuestion questionBankQuestion, boolean b);

    QuestionBankQuestionVO getQuestionBankQuestionVO(QuestionBankQuestion questionBankQuestion, HttpServletRequest request);

    Wrapper<QuestionBankQuestion> getQueryWrapper(QuestionBankQuestionQueryRequest questionBankQuestionQueryRequest);

    Page<QuestionBankQuestionVO> getQuestionBankQuestionVOPage(Page<QuestionBankQuestion> questionBankQuestionPage, HttpServletRequest request);

    /**
     * 批量添加题目列表信息
     * @param questionIds
     * @param questionId
     * @param userLoginUser
     */
    void batchAddQuestionsToBank(List<Long> questionIds, Long questionId, User userLoginUser);

    /**
     * 批量从题库中移除题目
     * @param questionIds
     * @param questionId
     * @param userLoginUser
     */
    void batchRemoveQuestionsFromBank(List<Long> questionIds, Long questionId,User userLoginUser);

    /**
     * 移除题目信息
     * @param questionIds
     */
    void batchDeleteQuestions(List<Long> questionIds);

    /**
     * 抽取方法 对事务进行批操作管理
     * @param questionBankQuestions
     */
    void batchAddQuestionsToBankInner(List<QuestionBankQuestion> questionBankQuestions);
}
